]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginDialog: subtract padding when drawing focus line
authorRay Strode <rstrode@redhat.com>
Sat, 17 Sep 2011 22:45:15 +0000 (18:45 -0400)
committerRay Strode <rstrode@redhat.com>
Sun, 18 Sep 2011 03:25:31 +0000 (23:25 -0400)
If there's no scrollbar in the user list it grows as the
user arrows around.  This is because it wasn't taking
padding into account when computing its destination size.

https://bugzilla.gnome.org/show_bug.cgi?id=658469

js/gdm/loginDialog.js

index 178551e3d7b124e0959352f76fb311f881d9ec17..664b3fafda600f8cd5e3a525b8198526d1170da7 100644 (file)
@@ -247,12 +247,15 @@ UserListItem.prototype = {
     showFocusAnimation: function(time) {
         let hold = new Batch.Hold();
 
+        let node = this.actor.get_theme_node();
+        let padding = node.get_horizontal_padding();
+
         let box = this._verticalBox.get_allocation_box();
 
         Tweener.removeTweens(this._focusBin);
         this._focusBin.width = 0;
         Tweener.addTween(this._focusBin,
-                         { width: box.x2 - box.x1,
+                         { width: (box.x2 - box.x1 - padding),
                            time: time,
                            transition: 'linear',
                            onComplete: function() {